﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using System.Windows.Navigation;
using RecipesManager.Data;

namespace RecipesManager
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        protected override void OnActivated(EventArgs e)
        {
            base.OnActivated(e);
            if (Manager.DatabaseIsReady) return;
            MessageBox.Show((string)Application.Current.FindResource("DatabaseIsNotReady"),
                            (string)Application.Current.FindResource("notification_dialog_type"),
                            MessageBoxButton.OK, MessageBoxImage.Error);
            MainWindow.Close();
        }
    }
}
